--[[
* MapLib 2.0
* File: <AddOn>\MapLib\MapLib_BlizzardMaps.lua
* $Revision: 132 $
* $Date: 2007-01-06 13:08:56 +0000 (Sat, 06 Jan 2007) $
* 
* Copyright (c) 2006-2007, Mery (Moritz Metelmann)
* All rights reserved.
* 
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* 
*    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
*    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
*    * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
]]--

local L = MapLib.Localization;

if (not MapLib) then MapLib = {}; end;
if (not MapLib.BlizzardMaps) then MapLib.BlizzardMaps = {}; end;
if (not MapLib.BlizzardMaps.tempTexture) then MapLib.BlizzardMaps.tempTexture = {}; end;
if (not MapLib.BlizzardMaps.PlayerPartyRaid) then MapLib.BlizzardMaps.PlayerPartyRaid = {}; end;
if (not MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList) then MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList = {}; end;
if (not MapLib.BlizzardMaps.PlayerPartyRaid.tempOriginalIndex) then MapLib.BlizzardMaps.PlayerPartyRaid.tempOriginalIndex = {}; end;
if (not MapLib.BlizzardMaps.ArathiBasin) then MapLib.BlizzardMaps.ArathiBasin = {}; end;
if (not MapLib.BlizzardMaps.Cosmic) then MapLib.BlizzardMaps.Cosmic = {}; end;

MapLib.BlizzardMaps.Load = function()
	MapLib.RegisterZone("WO_CM", L["The Cosmos"], nil, nil, "WORLD", "Interface\\WorldMap\\Cosmic\\Cosmic", MapLib.BlizzardMaps.Cosmic.ProcessMapClick, MapLib.BlizzardMaps.Cosmic.UpdateMapHighlight, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition)
	MapLib.RegisterZone("WO_AZ", L["Azeroth"], nil, "WO_CM", "WORLD", "Interface\\WorldMap\\World\\World", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition)

	MapLib.RegisterZone("CO_KA", L["Kalimdor"], nil, "WO_AZ", "CONTINENT", "Interface\\WorldMap\\Kalimdor\\Kalimdor", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 1, 0, 0)
	MapLib.RegisterZone("CO_EK", L["Eastern Kingdoms"], nil, "WO_AZ", "CONTINENT", "Interface\\WorldMap\\Azeroth\\Azeroth", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 1, 0, 0)
	MapLib.RegisterZone("CO_OL", L["Outland"], nil, "WO_CM", "CONTINENT", "Interface\\WorldMap\\Expansion01\\Expansion01", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 1, 0, 0)

	MapLib.RegisterZone("KA_AS", L["Ashenvale"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Ashenvale\\Ashenvale", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.15670371525706, 0.41757282062541, 0.33126468682991)
	MapLib.RegisterZone("KA_AZ", L["Azshara"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Aszhara\\Aszhara", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.13779501505279, 0.55282036918049, 0.30400571307545)
	MapLib.RegisterZone("KA_AI", L["Azuremyst Isle"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\AzuremystIsle\\AzuremystIsle", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.11062099220932, 0.27083294930702, 0.22259049614098)
	MapLib.RegisterZone("KA_BI", L["Bloodmyst Isle"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\BloodmystIsle\\BloodmystIsle", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.088655296604144, 0.25928394914775, 0.13960270183482)
	MapLib.RegisterZone("KA_DS", L["Darkshore"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Darkshore\\Darkshore", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.17799008894522, 0.38383175154516, 0.18206216123156)
	MapLib.RegisterZone("KA_DA", L["Darnassus"], "CO_KA", "KA_TE", "BLIZZARD", "Interface\\WorldMap\\Darnassis\\Darnassis", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_City, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.02876626176374, 0.38392150175204, 0.10441296545475)
	MapLib.RegisterZone("KA_DE", L["Desolace"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Desolace\\Desolace", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.12219839120669, 0.34873187115693, 0.50331046935371)
	MapLib.RegisterZone("KA_DU", L["Durotar"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Durotar\\Durotar", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.14368294970080, 0.51709782709100, 0.44802818134926)
	MapLib.RegisterZone("KA_DW", L["Dustwallow Marsh"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Dustwallow\\Dustwallow", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.14266384095509, 0.49026338351379, 0.60461876174686)
	MapLib.RegisterZone("KA_FW", L["Felwood"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Felwood\\Felwood", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.15625084006464, 0.41995800144849, 0.23097545880609)
	MapLib.RegisterZone("KA_FE", L["Feralas"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Feralas\\Feralas", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.18885970960818, 0.31589651244686, 0.61820581746798)
	MapLib.RegisterZone("KA_MO", L["Moonglade"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Moonglade\\Moonglade", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.06292695969921, 0.50130287793373, 0.17560823085517)
	MapLib.RegisterZone("KA_MU", L["Mulgore"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Mulgore\\Mulgore", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.13960673216274, 0.40811854919226, 0.53286226907346)
	MapLib.RegisterZone("KA_OG", L["Orgrimmar"], "CO_KA", "KA_DU", "BLIZZARD", "Interface\\WorldMap\\Ogrimmar\\Ogrimmar", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_City, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.03811449638057, 0.56378554142668, 0.42905218646258)
	MapLib.RegisterZone("KA_SI", L["Silithus"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Silithus\\Silithus", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.094656382676961, 0.39481452010205, 0.76460810800421)
	MapLib.RegisterZone("KA_SM", L["Stonetalon Mountains"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\StonetalonMountains\\StonetalonMountains", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.13272833611061, 0.37556627748617, 0.40285135292988)
	MapLib.RegisterZone("KA_TA", L["Tanaris"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Tanaris\\Tanaris", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.18750104661175, 0.46971301480866, 0.76120931364891)
	MapLib.RegisterZone("KA_TE", L["Teldrassil"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Teldrassil\\Teldrassil", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.13836131003639, 0.36011098024729, 0.03948322979210)
	MapLib.RegisterZone("KA_BA", L["The Barrens"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Barrens\\Barrens", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.27539211944292, 0.39249347333450, 0.45601063260257)
	MapLib.RegisterZone("KA_EX", L["The Exodar"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\TheExodar\\TheExodar", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_City, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.028716569570704, 0.28622349376637, 0.25583227044521)
	MapLib.RegisterZone("KA_TN", L["Thousand Needles"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Thousandneedles\\Thousandneedles", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.11956582877920, 0.47554411191734, 0.68342356389650)
	MapLib.RegisterZone("KA_TB", L["Thunder Bluff"], "CO_KA", "KA_MU", "BLIZZARD", "Interface\\WorldMap\\ThunderBluff\\ThunderBluff", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_City, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.02836291430658, 0.44972878210917, 0.55638479002362)
	MapLib.RegisterZone("KA_UN", L["Un'Goro Crater"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\UngoroCrater\\UngoroCrater", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.10054401185671, 0.44927594451520, 0.76494573629405)
	MapLib.RegisterZone("KA_WI", L["Winterspring"], "CO_KA", "CO_KA", "BLIZZARD", "Interface\\WorldMap\\Winterspring\\Winterspring", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.19293573573141, 0.47237382938446, 0.17390990272233)

	MapLib.RegisterZone("EK_AM", L["Alterac Mountains"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\Alterac\\Alterac", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.074366270003332, 0.43207557569817, 0.30653207961921)--+
	MapLib.RegisterZone("EK_AH", L["Arathi Highlands"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\Arathi\\Arathi", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.095613915481519, 0.47589302109228, 0.37160257158558)--+
	MapLib.RegisterZone("EK_BA", L["Badlands"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\Badlands\\Badlands", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.066066411276547, 0.508096381155, 0.60092640256114)--+
	MapLib.RegisterZone("EK_BL", L["Blasted Lands"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\BlastedLands\\BlastedLands", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.088973999708603, 0.48585295381558, 0.78725710394115)--+
	MapLib.RegisterZone("EK_BS", L["Burning Steppes"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\BurningSteppes\\BurningSteppes", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.077796955223848, 0.071127891080283, 0.64640929452333)--+
	MapLib.RegisterZone("EK_DP", L["Deadwind Pass"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\DeadwindPass\\DeadwindPass", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.066398549710186, 0.47500780001071, 0.75936971891386)--+
	MapLib.RegisterZone("EK_DM", L["Dun Morogh"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\DunMorogh\\DunMorogh", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.13080511095785, 0.40501263630777, 0.52075019786575)--+
	MapLib.RegisterZone("EK_DW", L["Duskwood"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\Duskwood\\Duskwood", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.071710364484034, 0.43074213262784, 0.7533938719565)--+
	MapLib.RegisterZone("EK_EP", L["Eastern Plaguelands"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\EasternPlaguelands\\EasternPlaguelands", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.1028070636552, 0.51091825231208, 0.2149020825499)--+
	MapLib.RegisterZone("EK_EF", L["Elwynn Forest"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\Elwynn\\Elwynn", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.092183246958656, 0.4120952182318, 0.68259649019698)--+
	MapLib.RegisterZone("EK_EW", L["Eversong Woods"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\EversongWoods\\EversongWoods", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.13080498015505, 0.50832930794103, 0.022014446046165)--
	MapLib.RegisterZone("EK_GL", L["Ghostlands"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\Ghostlands\\Ghostlands", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.08764602037759, 0.52946611920808, 0.1325679168685)--
	MapLib.RegisterZone("EK_HF", L["Hillsbrad Foothills"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\Hilsbrad\\Hilsbrad", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.084990040971733, 0.42454492644073, 0.35035505861517)--+
	MapLib.RegisterZone("EK_IF", L["Ironforge"], "CO_EK", "EK_DM", "BLIZZARD", "Interface\\WorldMap\\Ironforge\\Ironforge", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_City, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.021019252672294, 0.47182747418779, 0.54832515232157)--+
	MapLib.RegisterZone("EK_LM", L["Loch Modan"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\LochModan\\LochModan", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.073287302635337, 0.50582772698258, 0.54506866466594)--+
	MapLib.RegisterZone("EK_RM", L["Redridge Mountains"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\Redridge\\Redridge", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.057683647400465, 0.49459531868692, 0.70791095462321)--+
	MapLib.RegisterZone("EK_SG", L["Searing Gorge"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\SearingGorge\\SearingGorge", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.059260632532925, 0.46145141170536, 0.60930918342543)--+
	MapLib.RegisterZone("EK_SC", L["Silvermoon City"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\SilvermoonCity\\SilvermoonCity", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_City, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.032175639867728, 0.55914399893662, 0.057360414692792)--
	MapLib.RegisterZone("EK_SF", L["Silverpine Forest"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\Silverpine\\Silverpine", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.11154943777851, 0.3612449699764, 0.2998922154621)--+
	MapLib.RegisterZone("EK_SW", L["Stormwind City"], "CO_EK", "EK_EF", "BLIZZARD", "Interface\\WorldMap\\Stormwind\\Stormwind", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_City, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.035709933654831, 0.41619720577293, 0.69611262147422)--+
	MapLib.RegisterZone("EK_SV", L["Stranglethorn Vale"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\Stranglethorn\\Stranglethorn", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.16948215729522, 0.39389096359468, 0.81124357441748)--+
	MapLib.RegisterZone("EK_SS", L["Swamp of Sorrows"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\SwampOfSorrows\\SwampOfSorrows", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.060920563662507, 0.51191427952025, 0.74957601463362)--+
	MapLib.RegisterZone("EK_HI", L["The Hinterlands"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\Hinterlands\\Hinterlands", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.1022536085048, 0.49470602215502, 0.3078600442709)--+
	MapLib.RegisterZone("EK_TG", L["Tirisfal Glades"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\Tirisfal\\Tirisfal", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.12001536026912, 0.37231138122142, 0.21340813457223)--+
	MapLib.RegisterZone("EK_UC", L["Undercity"], "CO_EK", "EK_TG", "BLIZZARD", "Interface\\WorldMap\\Undercity\\Undercity", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_City, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.025501126172508, 0.42968342682543, 0.29147507194852)--+
	MapLib.RegisterZone("EK_WP", L["Western Plaguelands"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\WesternPlaguelands\\WesternPlaguelands", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.11420543417079, 0.44180851236422, 0.23216575300365)--+
	MapLib.RegisterZone("EK_WF", L["Westfall"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\Westfall\\Westfall", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.092957875074243, 0.37275409148277, 0.74077819283513)--+
	MapLib.RegisterZone("EK_WL", L["Wetlands"], "CO_EK", "CO_EK", "BLIZZARD", "Interface\\WorldMap\\Wetlands\\Wetlands", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.10980656518831, 0.46322197468736, 0.45186171960839)--+

	MapLib.RegisterZone("OL_BE", L["Blade's Edge Mountains"], "CO_OL", "CO_OL", "BLIZZARD", "Interface\\WorldMap\\BladesEdgeMountains\\BladesEdgeMountains", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.31063756192322, 0.23764245496023, 0.12136572766664)
	MapLib.RegisterZone("OL_HP", L["Hellfire Peninsula"], "CO_OL", "CO_OL", "BLIZZARD", "Interface\\WorldMap\\Hellfire\\Hellfire", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.29572601785455, 0.42695962143865, 0.3727822341354)
	MapLib.RegisterZone("OL_NA", L["Nagrand"], "CO_OL", "CO_OL", "BLIZZARD", "Interface\\WorldMap\\Nagrand\\Nagrand", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.31636363223917, 0.15461487983443, 0.496421238724)
	MapLib.RegisterZone("OL_NE", L["Netherstorm"], "CO_OL", "CO_OL", "BLIZZARD", "Interface\\WorldMap\\Netherstorm\\Netherstorm", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.31922663120132, 0.43018049601102, 0.031359505889299)
	MapLib.RegisterZone("OL_SV", L["Shadowmoon Valley"], "CO_OL", "CO_OL", "BLIZZARD", "Interface\\WorldMap\\ShadowmoonValley\\ShadowmoonValley", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.31493206652502, 0.50223320551917, 0.667307774448671)
	MapLib.RegisterZone("OL_SC", L["Shattrath City"], "CO_OL", "OL_TF", "BLIZZARD", "Interface\\WorldMap\\ShattrathCity\\ShattrathCity", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.07479650931888, 0.39285094019123, 0.62659871210948)
	MapLib.RegisterZone("OL_TF", L["Terokkar Forest"], "CO_OL", "CO_OL", "BLIZZARD", "Interface\\WorldMap\\TerokkarForest\\TerokkarForest", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.30920618857172, 0.33856382070744, 0.58589055062476)
	MapLib.RegisterZone("OL_ZM", L["Zangarmarsh"], "CO_OL", "CO_OL", "BLIZZARD", "Interface\\WorldMap\\Zangarmarsh\\Zangarmarsh", MapLib_ProcessMapClick_BlizzardReplace, MapLib_UpdateMapHighlight_BlizzardReplace, GetNumMapOverlays, GetMapOverlayInfo, GetPlayerMapPosition, GetCorpseMapPosition, GetDeathReleasePosition, 0.28785278303014, 0.20161609149628, 0.33380687463246)
	
	MapLib.RegisterZone("EK_AV", L["Alterac Valley"], "CO_EK", "EK_AM", "INSTANCE_BG", "Interface\\WorldMap\\AlteracValley\\AlteracValley", MapLib_AltercValley_ProcessMapClick, MapLib_AltercValley_UpdateMapHighligh, MapLib_AltercValley_GetNumMapOverlays, MapLib_AltercValley_GetMapOverlayInfo, MapLib_Battleground_GetPlayerMapPosition, MapLib_Battleground_GetCorpseMapPosition, MapLib_Battleground_GetDeathReleasePosition)
	MapLib.RegisterZone("EK_AB", L["Arathi Basin"], "CO_EK", "EK_AH", "INSTANCE_BG", "Interface\\WorldMap\\ArathiBasin\\ArathiBasin", MapLib_ArathiBasin_ProcessMapClick, MapLib_ArathiBasin_UpdateMapHighligh, MapLib_ArathiBasin_GetNumMapOverlays, MapLib_ArathiBasin_GetMapOverlayInfo, MapLib_Battleground_GetPlayerMapPosition, MapLib_Battleground_GetCorpseMapPosition, MapLib_Battleground_GetDeathReleasePosition)
	MapLib.RegisterZone("KA_WG", L["Warsong Gulch"], "CO_KA", "KA_AS", "INSTANCE_BG", "Interface\\WorldMap\\WarsongGulch\\WarsongGulch", MapLib_ArathiBasin_ProcessMapClick, MapLib_ArathiBasin_UpdateMapHighligh, MapLib_ArathiBasin_GetNumMapOverlays, MapLib_ArathiBasin_GetMapOverlayInfo, MapLib_Battleground_GetPlayerMapPosition, MapLib_Battleground_GetCorpseMapPosition, MapLib_Battleground_GetDeathReleasePosition)
	MapLib.RegisterZone("OL_ES", L["Eye of the Storm"], "CO_OL", "OL_NE", "INSTANCE_BG", "Interface\\WorldMap\\NetherstormArena\\NetherstormArena", MapLib_ArathiBasin_ProcessMapClick, MapLib_ArathiBasin_UpdateMapHighligh, MapLib_ArathiBasin_GetNumMapOverlays, MapLib_ArathiBasin_GetMapOverlayInfo, MapLib_Battleground_GetPlayerMapPosition, MapLib_Battleground_GetCorpseMapPosition, MapLib_Battleground_GetDeathReleasePosition)
end

MapLib.BlizzardMaps.VariablesLoaded = function()
	MapLib.POI.RegisterForPOI("BLIZZARD_PPR", L["Player / Party / Raid"], 1, nil, MapLib.BlizzardMaps.PlayerPartyRaid.GetNumUnits, MapLib.BlizzardMaps.PlayerPartyRaid.GetMapUnitInfo, MapLib.BlizzardMaps.PlayerPartyRaid.GetTooltip, true);
	MapLib.POI.RegisterForPOI("BLIZZARD_POI", L["Blizzard POI"], 2, nil, MapLib_GetNumMapLandmarks_BlizzardReplace, MapLib_GetMapLandmarkInfo_BlizzardReplace, MapLib_GetTooltip_Blizzarrd, false);
end;

MapLib.BlizzardMaps.PlayerPartyRaid.flagTexture = {file = "", size = 24};
MapLib.BlizzardMaps.PlayerPartyRaid.partyTexture = {file = "Interface\\WorldMap\\WorldMapPartyIcon", size = 16};
MapLib.BlizzardMaps.PlayerPartyRaid.playerTexture = {file = "Interface\\WorldMap\\WorldMapPlayerIcon", size = 16};
MapLib.BlizzardMaps.PlayerPartyRaid.corpseTexture = {file = "Interface\\Minimap\\POIIcons", size = 16, tcoordMinX = 0.875, tcoordMaxX = 1, tcoordMinY = 0, tcoordMaxY = 0.125};

MapLib.BlizzardMaps.PlayerPartyRaid.GetNumUnits = function()
	-- find out how many units are visible in the zone, and temp save id's
	MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList = {};
	MapLib.BlizzardMaps.PlayerPartyRaid.tempOriginalIndex = {};
	-- player
	local playerX, playerY = MapLib.GetUnitMapPosition("player");
	if ( playerX ~= 0 and playerY ~= 0 ) then
		tinsert(MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList, "player");
	end;
	-- party or raid
	if (GetNumRaidMembers() > 0) then
		for i=1, MAX_RAID_MEMBERS, 1 do
			local unit = "raid"..i;
			playerX, playerY = MapLib.GetUnitMapPosition(unit);
			if ( (playerX ~= 0 and playerY ~= 0) and not UnitIsUnit(unit, "player") ) then
				tinsert(MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList, unit);
			end;
		end;
	else
		for i=1, MAX_PARTY_MEMBERS, 1 do
			playerX, playerY = MapLib.GetUnitMapPosition("party"..i);
			if ( (playerX ~= 0 and playerY ~= 0)) then
				tinsert(MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList, "party"..i);
			end;
		end;
	end;
	-- battlefield positions
	for i=1, GetNumBattlefieldPositions(), 1 do
		playerX, playerY, _ = GetBattlefieldPosition(i);
		if ( (playerX ~= 0 and playerY ~= 0)) then
			tinsert(MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList, "team");
			MapLib.BlizzardMaps.PlayerPartyRaid.tempOriginalIndex[#MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList] = i;
		end;
	end;
	-- battlefield flags
	for i=1, GetNumBattlefieldFlagPositions(), 1 do
		playerX, playerY, _ = GetBattlefieldFlagPosition(i);
		if ( (playerX ~= 0 and playerY ~= 0)) then
			tinsert(MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList, "flag");
			MapLib.BlizzardMaps.PlayerPartyRaid.tempOriginalIndex[#MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList] = i;
		end;
	end;
	playerX, playerY = MapLib.GetCorpseMapPosition();
	if ( (playerX ~= 0 and playerY ~= 0)) then
		tinsert(MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList, "corpse");
	end;
	playerX, playerY = MapLib.GetDeathReleasePosition();
	if ( playerX ~= 0 and playerY ~= 0 and not UnitIsGhost("player")) then
		tinsert(MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList, "releaseMarker");
	end;
	return #MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList;
end;

MapLib.BlizzardMaps.PlayerPartyRaid.GetMapUnitInfo = function(i)
	local texture;
	-- return the info accroding to saveid's
	if (MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList[i] == "flag") then
		local flagX, flagY, flagToken = GetBattlefieldFlagPosition(MapLib.BlizzardMaps.PlayerPartyRaid.tempOriginalIndex[i]);
		MapLib.BlizzardMaps.PlayerPartyRaid.flagTexture.file = "Interface\\WorldStateFrame\\"..flagToken;
		return "flag"..MapLib.BlizzardMaps.PlayerPartyRaid.tempOriginalIndex[i], L["Flag"], MapLib.BlizzardMaps.PlayerPartyRaid.flagTexture, flagX, flagY, nil, MapLib.PRIORITYLEVEL_BLIZZARD_PPR, nil;
	elseif (MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList[i] == "team") then
		local playerX, playerY, name = GetBattlefieldPosition(MapLib.BlizzardMaps.PlayerPartyRaid.tempOriginalIndex[i]);
		return "team"..MapLib.BlizzardMaps.PlayerPartyRaid.tempOriginalIndex[i], name, MapLib.BlizzardMaps.PlayerPartyRaid.partyTexture, playerX, playerY, nil, MapLib.PRIORITYLEVEL_BLIZZARD_PPR, nil;
	elseif (MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList[i] == "corpse") then
		local corpseX, corpseY = MapLib.GetCorpseMapPosition();
		return "corpse", L["Corpse"], MapLib.BlizzardMaps.PlayerPartyRaid.corpseTexture, corpseX, corpseY, nil, MapLib.PRIORITYLEVEL_BLIZZARD_PPR, nil;
	elseif (MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList[i] == "releaseMarker") then
		local corpseX, corpseY = MapLib.GetDeathReleasePosition();
		return "releaseMarker", L["Spirit Healer"], MapLib.BlizzardMaps.PlayerPartyRaid.corpseTexture, corpseX, corpseY, nil, MapLib.PRIORITYLEVEL_BLIZZARD_PPR, nil;
	elseif (MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList[i] == "player") then
		texture = MapLib.BlizzardMaps.PlayerPartyRaid.playerTexture;
	else
		texture = MapLib.BlizzardMaps.PlayerPartyRaid.partyTexture;
	end;
	local x, y = MapLib.GetUnitMapPosition(MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList[i]);
	return MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList[i], UnitName(MapLib.BlizzardMaps.PlayerPartyRaid.tempIDList[i]), texture, x, y, nil, MapLib.PRIORITYLEVEL_BLIZZARD_PPR, nil;
end;

function MapLib.BlizzardMaps.PlayerPartyRaid.GetTooltip(id, name)
	-- check if the id still belongs to the name, if yes build tooltip,
	-- if not then build a tooltip saying to close/reopen to refresh
	if (strsub(id, 1, 4) == "flag") then
		local number = tonumber(strsub(id, 5));
		local _, _, flagToken = GetBattlefieldFlagPosition(number);
		MapLibBlizzardPOITooltipIcon:SetTexture("Interface\\WorldStateFrame\\"..flagToken); 
		MapLibBlizzardPOITooltipIcon:SetTexCoord(0, 1, 0, 1);
		MapLibBlizzardPOITooltipHeader:SetText(L["Flag"]);
		MapLibBlizzardPOITooltipDescription:Hide();
		MapLibBlizzardPOITooltipDescription2:Hide();		
		MapLibBlizzardPOITooltip:SetHeight(25);
		return MapLibBlizzardPOITooltip;
	elseif (strsub(id, 1, 4) == "team") then
		local number = tonumber(strsub(id, 5));
		local _, _, realName = GetBattlefieldPosition(number);
		if (realName == name) then
			MapLibBlizzardPOITooltipIcon:SetTexture("Interface\\WorldMap\\WorldMapPartyIcon"); 
			MapLibBlizzardPOITooltipIcon:SetTexCoord(0, 1, 0, 1);
			MapLibBlizzardPOITooltipHeader:SetText(name);
			MapLibBlizzardPOITooltipDescription:SetText(L["Not in your party/raid."]);
			MapLibBlizzardPOITooltipDescription:Show();
			MapLibBlizzardPOITooltipDescription2:Hide();		
			MapLibBlizzardPOITooltip:SetHeight(41);
			return MapLibBlizzardPOITooltip;
		end;
	elseif (id == "corpse") then
		MapLibBlizzardPOITooltipIcon:SetTexture("Interface\\Minimap\\POIIcons"); 
		MapLibBlizzardPOITooltipIcon:SetTexCoord(0.875, 1, 0, 0.125);
		MapLibBlizzardPOITooltipHeader:SetText(L["Corpse"]);
		MapLibBlizzardPOITooltipDescription:SetText(L["Your Corpse is here."]);
		MapLibBlizzardPOITooltipDescription:Show();
		MapLibBlizzardPOITooltipDescription2:Hide();		
		MapLibBlizzardPOITooltip:SetHeight(41);
		return MapLibBlizzardPOITooltip;
	elseif (id == "releaseMarker") then
		MapLibBlizzardPOITooltipIcon:SetTexture("Interface\\Minimap\\POIIcons"); 
		MapLibBlizzardPOITooltipIcon:SetTexCoord(0.875, 1, 0, 0.125);
		MapLibBlizzardPOITooltipHeader:SetText(L["Spirit Healer"]);
		MapLibBlizzardPOITooltipDescription:SetText(L["You will be released here."]);
		MapLibBlizzardPOITooltipDescription:Show();
		MapLibBlizzardPOITooltipDescription2:Hide();		
		MapLibBlizzardPOITooltip:SetHeight(41);
		return MapLibBlizzardPOITooltip;
	elseif (UnitName(id) == name) then
		local level, sex, race, class = UnitLevel(id), UnitSex(id), UnitRace(id), UnitClass(id)
		if (sex == 2) then sex = L["Male"] elseif (sex == 3) then sex = L["Female"] else sex = "" end;
		if (id == "player") then 
			MapLibBlizzardPOITooltipIcon:SetTexture("Interface\\WorldMap\\WorldMapPlayerIcon"); 
		else 
			MapLibBlizzardPOITooltipIcon:SetTexture("Interface\\WorldMap\\WorldMapPartyIcon");
		end;
		MapLibBlizzardPOITooltipIcon:SetTexCoord(0, 1, 0, 1);
		MapLibBlizzardPOITooltipHeader:SetText(name);
		MapLibBlizzardPOITooltipDescription:SetText(sex.." "..race.." "..class);
		MapLibBlizzardPOITooltipDescription:Show();
		MapLibBlizzardPOITooltipDescription2:SetText(L["Level: "]..level);
		MapLibBlizzardPOITooltipDescription2:Show();		
		MapLibBlizzardPOITooltip:SetHeight(56);
		return MapLibBlizzardPOITooltip;
	end;
	-- create no accurate info tooltip
end;

MapLib.BlizzardMaps.Cosmic.UpdateMapHighlight = function(adj_x, adj_y)
	if (adj_x > 115/1002 and adj_x < (115+320)/1002 and adj_y > 90/668 and adj_y < (90+320)/668) then
		-- we are over the cosmic circle (blizzard syle with a square button)
		return "BLEND", "", "Interface\\WorldMap\\Cosmic\\Cosmic-Outland-Highlight", 1, 1, 856/1002, 605/668, 23/1002, 34.5/668;
	elseif (adj_x > 593/1002 and adj_x < (593+366)/1002 and adj_y > 255/668 and adj_y < (255+366)/668) then
		--Azeroth Button
		return "BLEND", "", "Interface\\WorldMap\\Cosmic\\Cosmic-Azeroth-Highlight", 1, 1, 898/1002, 647/668, 103/1002, 10.5/668;
	end;
end;

MapLib.BlizzardMaps.Cosmic.ProcessMapClick = function(adj_x, adj_y)
	if (adj_x > 115/1002 and adj_x < (115+320)/1002 and adj_y > 90/668 and adj_y < (90+320)/668) then
		-- we are over the cosmic circle (blizzard syle with a square button)
		MapLib.SetMapToID("CO_OL");
	elseif (adj_x > 593/1002 and adj_x < (593+366)/1002 and adj_y > 255/668 and adj_y < (255+366)/668) then
		--Azeroth Button
		MapLib.SetMapToID("WO_AZ");
	end;
end;

function MapLib_GetTooltip_Blizzarrd(i, name)
	local name, description, textureIndex = MapLib_GetNameDescriptionTextureIndex_BlizzardReplace(i);
	MapLibBlizzardPOITooltipIcon:SetTexture("Interface\\Minimap\\POIIcons");
	MapLibBlizzardPOITooltipIcon:SetTexCoord(WorldMap_GetPOITextureCoords(textureIndex));
	MapLibBlizzardPOITooltipHeader:SetText(name);
	if (description and description ~= "") then
		MapLibBlizzardPOITooltipDescription:SetText(description);
		MapLibBlizzardPOITooltipDescription:Show();
		MapLibBlizzardPOITooltipDescription2:Hide();
		MapLibBlizzardPOITooltip:SetHeight(41);
	else
		MapLibBlizzardPOITooltipDescription:Hide();
		MapLibBlizzardPOITooltipDescription2:Hide();
		MapLibBlizzardPOITooltip:SetHeight(25);
	end;
	return MapLibBlizzardPOITooltip;
end

function MapLib_GetNumMapLandmarks_BlizzardReplace()
	if ( MapLib.mapShown == MapLib.GetCurrentBlizzardMapMapID() ) then
		return GetNumMapLandmarks();
	else
		if ( MapLib.ShownMapIsBattlegroundMap() ) then
			return #MapLib_CustomIconInfo[MapLib.mapShown];
		else
			return 0;
		end;
	end;
end;

function MapLib_GetNameDescriptionTextureIndex_BlizzardReplace(i)
	if ( MapLib.mapShown == MapLib.GetCurrentBlizzardMapMapID() ) then
		local name, description, textureIndex, _, _ = GetMapLandmarkInfo(i);
		return name, description, textureIndex;
	elseif ( MapLib.ShownMapIsBattlegroundMap() ) then
		local temp = MapLib_CustomIconInfo[MapLib.mapShown][i];
		if (temp) then
			return temp[1], temp[2], temp[3];
		end;
	end;
end;

function MapLib_GetMapLandmarkInfo_BlizzardReplace(i)
	if ( MapLib.mapShown == MapLib.GetCurrentBlizzardMapMapID() ) then
		local id, name, description, textureIndex, texture, x, y, priorityLevel;
		name, description, textureIndex, x, y = GetMapLandmarkInfo(i);
		id = i;
		local x1, x2, y1, y2 = WorldMap_GetPOITextureCoords(textureIndex);
		if (textureIndex == 15) then priorityLevel = 0; else priorityLevel = MapLib.PRIORITYLEVEL_BLIZZARD_POI; end;
		texture = { file = "Interface\\Minimap\\POIIcons", size = 16, tcoordMinX = x1, tcoordMaxX = x2, tcoordMinY = y1, tcoordMaxY = y2 };
		return id, name, texture, x, y, nil, priorityLevel, nil;
	elseif ( MapLib.ShownMapIsBattlegroundMap() ) then
		local temp = MapLib_CustomIconInfo[MapLib.mapShown][i];
		if (not temp) then return; end;
		local x1, x2, y1, y2 = WorldMap_GetPOITextureCoords(temp[3]);
		if (temp[3] == 15) then priorityLevel = 0; else priorityLevel = MapLib.PRIORITYLEVEL_BLIZZARD_POI; end;
		texture = { file = "Interface\\Minimap\\POIIcons", size = 16, tcoordMinX = x1, tcoordMaxX = x2, tcoordMinY = y1, tcoordMaxY = y2 };
		return i, temp[1], texture, temp[4], temp[5], nil, priorityLevel, nil;
	end;
end

function MapLib_UpdateMapHighlight_BlizzardReplace( adjustedX, adjustedY )
	local name, fileName, texPercentageX, texPercentageY, textureX, textureY, scrollChildX, scrollChildY = UpdateMapHighlight( adjustedX, adjustedY );
	if ( fileName ) then fileName = "Interface\\WorldMap\\"..fileName.."\\"..fileName.."Highlight"; end;
	return "ADD", name, fileName, texPercentageX, texPercentageY, textureX, textureY, scrollChildX, scrollChildY;
end

function MapLib_ProcessMapClick_BlizzardReplace( adjustedX, adjustedY )
	local zoneID = MapLib.GetMapIDByName(MapLibFrameAreaLabel:GetText());
	if (zoneID) then MapLib.SetMapToID(zoneID); end;
end;

function MapLib_UpdateMapHighlight_City( adjustedX, adjustedY )
	return;
end;

function MapLib_ArathiBasin_ProcessMapClick()
end

function MapLib_ArathiBasin_UpdateMapHighligh()
end

function MapLib_ArathiBasin_GetNumMapOverlays()
	return 0;
end

function MapLib_ArathiBasin_GetMapOverlayInfo(i)
	return 0, 0, 0, 0, 0, 0, 0;
end

function MapLib_Battleground_GetPlayerMapPosition(unitID)
	if ( MapLib.IsInBattleGround() == MapLib.mapShown ) then
		return GetPlayerMapPosition(unitID);
	else
		return 0, 0;
	end;
end;

function MapLib_Battleground_GetDeathReleasePosition()
	if ( MapLib.IsInBattleGround() == MapLib.mapShown ) then
		return GetDeathReleasePosition();
	else
		return 0, 0;
	end;
end;

function MapLib_Battleground_GetCorpseMapPosition()
	if ( MapLib.IsInBattleGround() == MapLib.mapShown ) then
		return GetCorpseMapPosition();
	else
		return 0, 0;
	end;
end;

function MapLib_AltercValley_ProcessMapClick()
end

function MapLib_AltercValley_UpdateMapHighligh()
end

function MapLib_AltercValley_GetNumMapOverlays()
	return #MapLib_CustomOverlayInfo["EK_AV"];
end

function MapLib_AltercValley_GetMapOverlayInfo(i)
	local temp = MapLib_CustomOverlayInfo["EK_AV"][i];
	return temp[1], temp[2], temp[3], temp[4], temp[5], temp[6], temp[7];
end

function MapLib_AltercValley_GetPlayerMapPosition(unitID)
	if (MapLib.GetCurrentBlizzardMapMapID() == "EK_AV") then
		return GetPlayerMapPosition(unitID);
	else
		return 0, 0;
	end;
end;

MapLib_CustomOverlayInfo = {};
MapLib_CustomOverlayInfo["EK_AV"] = {};
tinsert(MapLib_CustomOverlayInfo["EK_AV"], {"Interface\\WorldMap\\AlteracValley\\DUNBALDAR", 270, 240, 348, 13, 0, 0});
tinsert(MapLib_CustomOverlayInfo["EK_AV"], {"Interface\\WorldMap\\AlteracValley\\ICEBLOODGARRISON", 300, 300, 335, 172, 0, 0});
tinsert(MapLib_CustomOverlayInfo["EK_AV"], {"Interface\\WorldMap\\AlteracValley\\FROSTWOLFKEEP", 235, 290, 399, 375, 0, 0});

MapLib_CustomIconInfo = {};
MapLib_CustomIconInfo["EK_AB"] = {};
tinsert(MapLib_CustomIconInfo["EK_AB"], {L["Blacksmith"], L["No Battleground Data"], 26, 0.48170432448387, 0.44361248612404});
tinsert(MapLib_CustomIconInfo["EK_AB"], {L["Farm"], L["No Battleground Data"], 31, 0.58748823404312, 0.5845907330513});
tinsert(MapLib_CustomIconInfo["EK_AB"], {L["Gold Mine"], L["No Battleground Data"], 16, 0.58958190679553, 0.28183627128601});
tinsert(MapLib_CustomIconInfo["EK_AB"], {L["Lumber Mill"], L["No Battleground Data"], 21, 0.38506099581718, 0.59381663799286});
tinsert(MapLib_CustomIconInfo["EK_AB"], {L["Stables"], L["No Battleground Data"], 36, 0.38306239247322, 0.27909454703331});
MapLib_CustomIconInfo["EK_AV"] = {};
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Coldtooth Mine"], L["No Battleground Data"], 0, 0.46591836214066, 0.71998536586761});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Dun Baldar"], "", 15, 0.42488425970078, 0.13887496292591});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Dun Baldar North Bunker"], L["No Battleground Data"], 10, 0.45060202479362, 0.14774397015572});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Dun Baldar South Bunker"], L["No Battleground Data"], 10, 0.43936118483543, 0.18190507590771});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["East Frostwolf Tower"], L["No Battleground Data"], 9, 0.4925394654274, 0.84533339738846});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Frostwolf Graveyard"], L["No Battleground Data"], 12, 0.49289724230766, 0.76769089698792});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Frostwolf Keep"], "", 15, 0.47353866696358, 0.86882364749908});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Frostwolf Relief Hut"], L["No Battleground Data"], 12, 0.49256309866905, 0.88512098789215});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Iceblood Garrison"], "", 15, 0.46008566021919, 0.57459247112274});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Iceblood Graveyard"], L["No Battleground Data"], 12, 0.51606702804565, 0.5722947716713});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Iceblood Tower"], L["No Battleground Data"], 9, 0.4849094748497, 0.58321726322174});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Icewing Bunker"], L["No Battleground Data"], 10, 0.50525403022766, 0.30725368857384});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Icewing Cavern"], "", 15, 0.4059229195118, 0.28649938106537});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Irondeep Mine"], L["No Battleground Data"], 0, 0.49826028943062, 0.10053339600563});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Snowfall Graveyard"], L["No Battleground Data"], 7, 0.44691896438599, 0.45596879720688});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Stonehearth Bunker"], L["No Battleground Data"], 10, 0.52753937244415, 0.44094896316528});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Stonehearth Graveyard"], L["No Battleground Data"], 14, 0.51842433214188, 0.36086165904999});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Stonehearth Outpost"], "", 15, 0.48942184448242, 0.38362801074982});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Stormpike Aid Station"], L["No Battleground Data"], 14, 0.42475894093513, 0.1575772613287});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Stormpike Graveyard"], L["No Battleground Data"], 14, 0.49245876073837, 0.14813795685768});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Tower Point"], L["No Battleground Data"], 9, 0.5023187994957, 0.65347993373871});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["West Frostwolf Tower"], L["No Battleground Data"], 9, 0.48327150940895, 0.84365195035934});
tinsert(MapLib_CustomIconInfo["EK_AV"], {L["Wildpaw Cavern"], "", 15, 0.5278822183609, 0.89257228374481});
MapLib_CustomIconInfo["KA_WG"] = {};
MapLib_CustomIconInfo["OL_ES"] = {};
tinsert(MapLib_CustomIconInfo["OL_ES"], {L["Blood Elf Tower"], L["No Battleground Data"], 5, 0.5672792792320252, 0.5732930302619934});
tinsert(MapLib_CustomIconInfo["OL_ES"], {L["Draenei Ruins"], L["No Battleground Data"], 5, 0.5602994561195374, 0.4066464304924011});
tinsert(MapLib_CustomIconInfo["OL_ES"], {L["Fel Reaver Ruins"], L["No Battleground Data"], 5, 0.4010230600833893, 0.5892181992530823});
tinsert(MapLib_CustomIconInfo["OL_ES"], {L["Mage Tower"], L["No Battleground Data"], 5, 0.3951749801635742, 0.4210464656352997});
tinsert(MapLib_CustomIconInfo["OL_ES"], {L["Netherstorm Flag"], L["No Battleground Data"], 45, 0.4804124236106873, 0.4913892447948456});

MapLib.BlizzardMaps.Load();
MapLib.BlizzardMaps.Load = nil;